<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript" src="${ctx}/appjs/ticket/tenantTicketType.js"></script>
    <link rel="stylesheet" href="${ctx}/statics/css/update.css">
    <link rel="stylesheet" href="${ctx}/statics/css/common.css">
    <link rel="stylesheet" href="${ctx}/libjs/plugins/bootstrap-table-pagejump/bootstrap-table-pagejump.css">
    <script src="${ctx}/libjs/plugins/bootstrap-table-pagejump/bootstrap-table-pagejump.js"></script>
    <%--<link rel="stylesheet" href="${ctx}/libjs/plugins/laydate/skins/laydate.css">--%>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/laydate/laydate.css">
    <script src="${ctx}/libjs/plugins/laydate/laydate.js"></script>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/bootStrap-table-fixed-column/bootstrap-table-fixed-columns.css">
    <script src="${ctx}/libjs/plugins/bootStrap-table-fixed-column/bootstrap-table-fixed-columns.js"></script>
    <style>
        .bootstrap-table .fixed-table-container .table thead th .th-inner {
            text-align: center !important;
        }
    </style>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return '<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>卡劵管理</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>卡劵列表</strong>' +
            '</li>' +
            '</ol>';
    });

    var has_add = '';
    var has_edit = '';
    var has_delete = '';
    var OperationsManagement_coupon_update = false;
    var OperationsManagement_coupon_look = false;
</script>


<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">


                <div class="row">
                    <input id="ticketName" type="text" class="form-control" placeholder="卡劵名称">

                    <input id="startDate" name="startDate" type="text"
                           class="form-control layer-date input-distance timeInput"
                           placeholder="开始时间" >
                    <input id="endDate" name="endDate" type="text"
                           class="form-control layer-date input-distance timeInput"
                           placeholder="结束时间">

                    <select type="text" class="form-control input-distance" id="ticketSuitType">
                        <option value="">卡卷类型</option>
                        <option value="0">充电减免</option>
                        <option value="1">服务费减免</option>
                        <option value="2">充电满折</option>
                        <option value="3">服务费满折</option>
                        <option value="4">代金券</option>
                    </select>

                    <select type="text" class="form-control input-distance" id="availabilityStatus">
                        <option value="">状态</option>
                        <option value="0">发放中</option>
                        <option value="1">已作废</option>
                        <option value="2">未开始</option>
                        <option value="3">已发放</option>
                    </select>

                    <button class="btn btn-success input-distance" onclick="tenantTicketType.reLoad()">查询</button>
                    <button type="button" class="btn  btn-primary input-distance" onclick="tenantTicketType.addTenantTicketType()">新增优惠券</button>
                    &nbsp;
                    <div class="pull-left search fr">
                        <button class="btn btn-success exportBtn" onclick="tenantTicketType.exportInfo()">导出</button>
                    </div>
                </div>
            </div>
            <table id="exampleTable" data-mobile-responsive="true">
            </table>
        </div>
    </div>
</div>
</div>
<script type="text/javascript">
    tenantTicketType.init();



    // var startDate = laydate.render({
    //     elem: '#startDate',
    //     type: 'datetime',
    //     format: 'yyyy-MM-dd HH:mm:ss',
    //     trigger: 'click',
    //     done: function (value, dates) {
    //         endTime.config.min = {
    //             year: dates.year,
    //             month: dates.month - 1, //关键
    //             date: dates.date,
    //             hours: 0,
    //             minutes: 0,
    //             seconds: 0
    //         };
    //     }
    // });
    //
    // var endDate = laydate.render({
    //     elem: '#endDate',
    //     type: 'datetime',
    //     format: 'yyyy-MM-dd HH:mm:ss',
    //     trigger: 'click'
    // });

    var startDate = {
        elem: '#startDate',
        format: 'YYYY-MM-DD hh:mm:ss',
        // theme: '#3195f0',
        // min: laydate.now(), //设定最小日期为当前日期
        // max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            $("#endDate").val("")
            endDate.min = datas
        }
    };
    var endDate = {
        elem: '#endDate',
        format: 'YYYY-MM-DD hh:mm:ss',
        // theme: '#3195f0',
        // min: laydate.now(),
        // max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            startDate.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };

    laydate(startDate);
    laydate(endDate);
    laydate.skin('molv');//皮肤
</script>
</body>
</html>